package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 用户注册功能DTO类
 */
@Data
public class UserRegDTO {
//    @NotNull(message = "用户名不能为空值")
//    @NotEmpty(message = "用户名不能为空字符串或空值")
    @NotBlank(message = "用户名不能为空白或空字符串或空值")
//    @Size(min = 6,max = 12,message = "用户名长度必须为6-12位")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}$|^\\S{1,14}$", message = "用户名长度不能超过7个汉字或14个字符")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "用户密码",required = true)
    private String password;
    @ApiModelProperty(value = "用户昵称",required = true)
    private String nickname;
}
